<?=$this->load->view('include_header',null)?>
<style type="text/css">
form#form textarea {
    height: 50px;
    overflow: auto;
    padding: 5px;
    width: 410px;
}
</style>
	<div id="top-panel">
		<div id="panel">
			<ul>
				<li class="current"><a href="<?=site_url('archive/idcard/'.$id)?>" class="report"><?=(empty($id))?"录入新":"编辑"?>客户基本信息</a></li>
				<?php if(!empty($info->id)):?><li><a id="printInfo" class="folder_table">打印本页信息</a></li><?php endif;?>
			</ul>
		</div>
	</div>
	<div id="wrapper">
		<div id="content">
			<div id="box">
<!-- table begin -->
<form method="post" id="form"  enctype="multipart/form-data" action="<?=site_url('schengen/co_update/'.$cateid)?>">

	<h3>哥伦比亚申请表</h3>
    <table width="100%">
    <thead>
        <tr>
          <td colspan="4" align="right"><img src="<?= (@$info->avatar)?@$info->avatar:'images/avatar.gif'?>" width="150" height="150" /></td>
		  <td align="right">
		  上传照片<br />
		  <input type="file" name="userphoto" /><br />
		  (.gif|.jpg|.png文件,最大1M)<br />
		  <?php if (@$info->attachment):?><a href="<?= @$info->attachment?>" target="_blank">点击下载附件</a><?php endif; ?>
		  &nbsp;&nbsp;&nbsp;&nbsp;上传附件<br />
		  <input type="file" name="userfile" /><br />
		  (.pdf|.zip|.rar|.doc,最大2M)		  </td>
        </tr>
    </thead>
    <tfoot>
        <tr>
            <td colspan="5" align="right">			
			<input type="hidden" name="id" value="<?=$id?>" />
			<input id="button1" type="submit" value="提交信息" />
			<input id="button2" type="reset" value="重置" />			</td>
        </tr>
    </tfoot>

    <tbody>
        <tr class="odd">
            <td colspan="5">ACTIVIDAD A REALIZAR EN COLOMBIA  Y RELACIÓN DE ANEXOS (ACTIVITY TO BE CARRIED OUT IN COLOMBIA AND  ATTACHMENT LIST):</td>
			</tr>
		<tr class="even">
            <td colspan="5"><textarea name="carried_list"><?= @$info->carried_list?></textarea></td>
			</tr>
		<tr class="odd">
            <td> APELLIDO  (SURNAME – FAMILY NAME)  </td>
			<td><input type="text" name="surname" value="<?= @$info->surname?>"/></td>
			<td>&nbsp;</td>
			<td>OTROS APELLIDOS (MOTHER’S NAME AND/OR MAIDEN NAME)</td>
			<td><input type="text" name="former" value="<?= @$info->former?>"/></td>
        </tr>
		<tr class="even">
            <td>NOMBRES (GIVEN NAME)   </td>
			<td><input type="text" name="firstname" value="<?= @$info->firstname?>"/></td>
			<td>&nbsp;</td>
			<td>FECHA DE NACIMIENTO (DATE OF BIRTH) </td>
			<td><select name="birth_d"><?php for($i=1;$i<=31;$i++) echo "<option value='$i'".((@$info->birth_d==$i)?"selected":"").">$i</option>"; ?></select> - 
			<select name="birth_m"><?php for($i=1;$i<=12;$i++) echo "<option value='$i'".((@$info->birth_m==$i)?"selected":"").">$i</option>"; ?></select> - 
			<select name="birth_y"><?php for($i=date("Y");$i>1940;$i--) echo "<option value='$i'".((@$info->birth_y==$i)?"selected":"").">$i</option>"; ?></select></td>
        </tr>
		<tr class="odd">
            <td>PAÍS DE NACIMIENTO – (PLACE OF BIRTH – COUNTRY) </td>
			<td><input type="text" name="birth_place" value="<?= @$info->birth_place?>"/></td>
			<td>&nbsp;</td>
			<td><p>NACIONALIDAD  (NATIONALITY)</p></td>
			<td><input type="text" name="nationality" value="<?= @$info->nationality?>"/></td>
        </tr>
		<tr class="even">
            <td>ESTADO CIVIL:(MARITAL STATUS)</td>
			<td colspan="4">
			<input type="radio" name="marital_status" value="1" <?= (@$info->marital_status==1)?'checked':''?> />SOLTERO(SINGLE)<br />
			<input type="radio" name="marital_status" value="2" <?= (@$info->marital_status==2)?'checked':''?> />CASADO(MARRIED)<br />
			<input type="radio" name="marital_status" value="3" <?= (@$info->marital_status==3)?'checked':''?> />VIUDO (WIDOW)<br />
			<input type="radio" name="marital_status" value="4" <?= (@$info->marital_status==4)?'checked':''?> />UNION LIBRE(COMMON LAW)<br />
			<input type="radio" name="marital_status" value="5" <?= (@$info->marital_status==5)?'checked':''?> />DIVORCIADO(DIVORCED)<br />
			Otro explique (Other explain):
			<input type="text" name="marital_status_other" value="<?= @$info->marital_status_other?>"/></td>
			</tr>
		<tr class="odd">
            <td>PASAPORTE NÚMERO (PASSPORT NUMBER) </td>
			<td><input type="text" name="travel_document_num" value="<?= @$info->travel_document_num?>"/></td>
			<td>&nbsp;</td>
			<td> SEXO (SEX)</td>
			<td>
			<input type="radio" name="sex" value="2" <?= (@$info->sex==2)?'checked':''?> />F       
			<input type="radio" name="sex" value="1" <?= (@$info->sex==1)?'checked':''?> />M</td>
        </tr>
		<tr class="even">
            <td>&nbsp;</td>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
        </tr>
		<tr class="odd">
            <td colspan="4">¿POSEE OTRAS NACIONALIDADES Y/O  PASAPORTES?<br />
            	(DO  YOU HAVE OTHER NATIONALITES AND/OR PASSPORTS?)  </td>
			<td>
			<input type="radio" name="has_other_passport" value="0" <?= (@$info->has_other_passport==0)?'checked':''?>/>NO           
			<input type="radio" name="has_other_passport" value="1" <?= (@$info->has_other_passport==1)?'checked':''?>/>SI/YES </td>
        </tr>
		<tr class="even">
            <td>EXPLIQUE (EXPLAIN)</td>
			<td colspan="4"><input type="text" name="explain" value="<?= @$info->explain?>" style="width:300px"/></td>
			</tr>
		<tr class="odd">
            <td colspan="5">
			No. CÉDULA DE EXTRANJERÍA 
            	<input type="text" name="certificate" value="<?= @$info->certificate?>"/>  
            	O (OR) No. TARJETA DE EXTRANJERÍA /
            	<input type="text" name="card" value="<?= @$info->card?>"/>            </td>
			</tr>
		<tr class="even">
            <td>PROFESIÓN (PROFESSION) </td>
			<td><input type="text" name="profession" value="<?= @$info->profession?>"/></td>
			<td>&nbsp;</td>
			<td> (AND/OR) ACTIVIDAD (OCCUPATION) </td>
			<td><input type="text" name="occupation" value="<?= @$info->occupation?>"/></td>
        </tr>
		<tr class="odd">
            <td> ENTIDAD RESPONSABLE (COMPANY)</td>
			<td><input type="text" name="company" value="<?= @$info->company?>"/></td>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
        </tr>
		<tr class="even">
            <td>DIRECCIÓN ÚLTIMO DOMICILIO (PREVIOUS ADDRESS OF RESIDENCE)    </td>
			<td colspan="4"><input type="text" name="residence_address" value="<?= @$info->residence_address?>" style="width:300px"/></td>
			</tr>
		<tr class="odd">
            <td>CIUDAD (CITY) </td>
			<td><input type="text" name="residence_city" value="<?= @$info->residence_city?>"/></td>
			<td>&nbsp;</td>
			<td> PAÍS (COUNTRY)</td>
			<td><input type="text" name="residence_country" value="<?= @$info->residence_country?>"/></td>
        </tr>
		<tr class="even">
            <td><strong>DIRECCIÓN   PREVISTA EN COLOMBIA</strong> (ADDRESS IN COLOMBIA) </td>
			<td colspan="4"><input type="text" name="colombia_address" value="<?= @$info->colombia_address?>" style="width:300px"/></td>
			</tr>
		<tr class="odd">
            <td> CIUDAD (CITY)</td>
			<td><input type="text" name="colombia_city" value="<?= @$info->colombia_city?>"/></td>
			<td>&nbsp;</td>
			<td>TELÉFONOS (PHONES) </td>
			<td><input type="text" name="colombia_tel" value="<?= @$info->colombia_tel?>"/></td>
        </tr>
		<tr class="even">
            <td>TEL. OFICINA (OFFICE)</td>
			<td><input type="text" name="colombia_off_tel" value="<?= @$info->colombia_off_tel?>"/></td>
			<td>&nbsp;</td>
			<td>CORREO ELECTRÓNICO (<strong>email)</strong></td>
			<td><input type="text" name="email" value="<?= @$info->email?>" id="email"/></td>
        </tr>
		<tr class="odd">
            <td>&nbsp;</td>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
        </tr>
		<tr class="even">
            <td colspan="4"><strong>HA SOLICITADO ANTES VISA  PARA COLOMBIA</strong> (IF APPLIED BEFORE PLEASE ANSWER): </td>
			<td><input type="radio" name="has_applied" value="1" <?= (@$info->has_applied==1)?'checked':''?>/>SI (YES)           
			<input type="radio" name="has_applied" value="0" <?= (@$info->has_applied==0)?'checked':''?>/>NO       </td>
        </tr>
		<tr class="odd">
            <td>VISA  ANTERIOR(PREVIOUS VISA) </td>
			<td><input type="text" name="pre_visa" value="<?= @$info->pre_visa?>"/></td>
			<td>&nbsp;</td>
			<td>NÚMERO (NUMBER)</td>
			<td><input type="text" name="pre_visa_num" value="<?= @$info->pre_visa_num?>"/></td>
        </tr>
		<tr class="even">
            <td>FECHA(DATE)</td>
			<td><select name="pre_visa_d"><option></option><?php for($i=1;$i<=31;$i++) echo "<option value='$i'".((@$info->pre_visa_d==$i)?"selected":"").">$i</option>"; ?></select> - 
			<select name="pre_visa_m"><option></option><?php for($i=1;$i<=12;$i++) echo "<option value='$i'".((@$info->pre_visa_m==$i)?"selected":"").">$i</option>"; ?></select> - 
			<select name="pre_visa_y"><option></option><?php for($i=date("Y");$i>1940;$i--) echo "<option value='$i'".((@$info->pre_visa_y==$i)?"selected":"").">$i</option>"; ?></select></td>
			<td>&nbsp;</td>
			<td>LUGAR DE EXPEDICIÓN(CITY WHERE VISA WAS ISSUED)</td>
			<td><input type="text" name="pre_visa_city" value="<?= @$info->pre_visa_city?>"/></td>
        </tr>
		<tr class="odd">
            <td colspan="2">¿LE HA SIDO NEGADA ALGUNA SOLICITUD?(HAS PAST APPLICATION BEEN DENIED?) 
			<input type="radio" name="is_denied" value="1" <?= (@$info->is_denied==1)?'checked':''?>/>SI(YES)         
			<input type="radio" name="is_denied" value="0" <?= (@$info->is_denied==0)?'checked':''?>/>NO(NO) </td>
			<td>&nbsp;</td>
			<td colspan="2">¿LE HA SIDO CANCELADA ALGUNA VISA?(HAS A VISA BEEN CANCELED BEFORE?) 
				<input type="radio" name="is_canceled" value="1" <?= (@$info->is_canceled==1)?'checked':''?>/>SI         
				<input type="radio" name="is_canceled" value="0" <?= (@$info->is_canceled==0)?'checked':''?>/>NO </td>
			</tr>
		<tr class="even">
            <td>TIPO DE VISA NEGADA O CANCELADA(TYPE VISA DENIED OR CANCELLED) </td>
			<td><input type="text" name="visa_type" value="<?= @$info->visa_type?>"/></td>
			<td>&nbsp;</td>
			<td>FECHA(DATE)</td>
			<td><select name="visa_type_d"><option></option><?php for($i=1;$i<=31;$i++) echo "<option value='$i'".((@$info->visa_type_d==$i)?"selected":"").">$i</option>"; ?></select> - 
			<select name="visa_type_m"><option></option><?php for($i=1;$i<=12;$i++) echo "<option value='$i'".((@$info->visa_type_m==$i)?"selected":"").">$i</option>"; ?></select> - 
			<select name="visa_type_y"><option></option><?php for($i=date("Y");$i>1940;$i--) echo "<option value='$i'".((@$info->visa_type_y==$i)?"selected":"").">$i</option>"; ?></select></td>
        </tr>
		<tr class="odd">
            <td>&nbsp;</td>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
        </tr>
		<tr class="even">
            <td colspan="5"><p><strong>POR  FAVOR LEA Y MARQUE CADA UNA DE LAS SIGUIENTES PREGUNTAS</strong>:<br />
            	(READ AND  ANSWER EACH OF THE FOLLOWING QUESTIONS)</p></td>
			</tr>
		<tr class="odd">
            <td colspan="4">¿ALGUNA VEZ FUE EXPULSADO            O DEPORTADO            DE COLOMBIA?                      <br />
            	(HAVE  YOU EVER BEEN EXPELLED      OR DEPORTED           FROM COLOMBIA?)</td>
			<td><input type="radio" name="is_q1" value="1" <?= (@$info->is_q1==1)?'checked':''?>/>SI                    <input type="radio" name="is_q1" value="0" <?= (@$info->is_q1==0)?'checked':''?>/>NO   </td>
        </tr>
		<tr class="even">
            <td colspan="4"><p>¿HA TENIDO O TIENE PROCESOS PENALES EN  SU CONTRA? EXPLIQUE<strong>*</strong>                             <br />
            	(DO YOU HAVE  CRIMINAL RECORDS? EXPLAIN)<strong>*</strong>                                                      </p></td>
			<td> <input type="radio" name="is_q2" value="1" <?= (@$info->is_q2==1)?'checked':''?>/>SI                    <input type="radio" name="is_q2" value="0" <?= (@$info->is_q2==0)?'checked':''?>/>NO   </td>
        </tr>
		<tr class="odd">
            <td colspan="4">¿HA PERMANECIDO EN ALGUNA OPORTUNIDAD  EN COLOMBIA SIN VISA QUE LO AUTORICE?   <br />
            	(HAVE  YOU EVER BEEN IN COLOMBIA  WITHOUT AN AUTHORIZED VISA?)  </td>
			<td><input type="radio" name="is_q3" value="1" <?= (@$info->is_q3==1)?'checked':''?>/>SI                    <input type="radio" name="is_q3" value="0" <?= (@$info->is_q3==0)?'checked':''?>/>NO   </td>
        </tr>
		<tr class="even">
            <td><p><strong>*</strong>ESPECIFIQUE						<strong>*</strong>(SPECIFY)</p></td>
			<td colspan="4"><textarea name="specify"><?= @$info->specify?></textarea></td>
			</tr>
		<tr class="odd">
            <td>&nbsp;</td>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
        </tr>
		<tr class="even">
            <td>RESIDE ALGÚN FAMILAR SUYO EN COLOMBIA? (INDIQUE PARENTESCO Y  CLASE DE VISA DEL FAMILIAR) (DO YOU HAVE ANY RELATIVE RESIDING IN COLOMBIA (LIST NAMES,  RELATIONSHIP, AND VISA): </td>
			<td colspan="4"><textarea name="relative"><?= @$info->relative?></textarea></td>
			</tr>
		<tr class="odd">
            <td>&nbsp;</td>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
        </tr>
		<tr class="even">
            <td>FECHA DE LA SOLICITUD  (DATE - APPLICATION): </td>
			<td colspan="4"><select name="sign_d"><option></option><?php for($i=1;$i<=31;$i++) echo "<option value='$i'".((@$info->sign_d==$i)?"selected":"").">$i</option>"; ?></select> - 
			<select name="sign_m"><option></option><?php for($i=1;$i<=12;$i++) echo "<option value='$i'".((@$info->sign_m==$i)?"selected":"").">$i</option>"; ?></select> - 
			<select name="sign_y"><option></option><?php for($i=date("Y");$i>1940;$i--) echo "<option value='$i'".((@$info->sign_y==$i)?"selected":"").">$i</option>"; ?></select></td>
			</tr>
		<tr class="odd">
            <td>&nbsp;</td>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
        </tr>
		<tr class="even">
            <td>&nbsp;</td>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
        </tr>
    </tbody>
	</table>
<!-- table end -->
</form>

			</div>
		</div>
		
		<?=$this->load->view('include_sidebar',array('id'=>$id,'forms'=>$forms))?>
	</div>

<script type="text/javascript">
$().ready(function() {
  $("#form").validate({
    rules: {
		surname:"required",
		firstname:"required",
		birth_place:"required",
		nationality:"required",
		travel_document_num:"required",
		sex:"required"
    }
  });
  
	$.datepicker.setDefaults(
		{
		dateFormat: 'dd/mm/yy',
		changeMonth: true,
		changeYear: true,
		showOn: "both",
		buttonImage: "images/calendar.gif",
		buttonImageOnly: true
		}
	);
	$("#sign_date").datepicker();
	
	$("#email").autoMail();

	$("#printInfo").click(function(o) {
		var prints = [
			{rel_id: <?=$cateid?>, rec_id: <?=$id?>}
		]  ;
		
		var jdata = JSON.stringify(prints);
		//alert(jdata);
		$.post("<?=site_url('proxy/does/'.str_replace('==','',base64_encode('http://'.$_SERVER['SERVER_NAME'].':9090/javaprduct/servlet/test')))?>",{clients:jdata},function(msg){alert(msg)});
	});
	
	$("#printInfo").ajaxError(function(event,request, settings){
		//$(this).append("<li>出错页面:" + settings.url + "</li>");
		alert("无法访问"+ settings.url );
	}); 
 
});
</script>

<?=$this->load->view('include_footer',null)?>